One of Alpha's great features is that you can write your own functions to do exactly what you want to do. Here is some advice how to do it in a way which makes it as easy as possible to upgrade to a new version of Alpha or HTML mode.
Don't change any of the tcl files unless absolutely necessary. Rather do the following.
If you write something which you think is of general interest, please share your code with the rest of the world by sending it to me so I can include it in future versions of HTML mode.
If you write some new procs and want to add new menu items to the two HTML menus it can be done easily with a little programming. The method described below can be used to add things to all HTML submenus with a few exceptions.
Each submenu is defined by a variable html<first word in menu name>Sub, which is a list of lists defining the menu items. For example the variable defining the submenu "Home Page Windows" is defined by
set htmlHomeSub {{"" Open...} {"<U<O/V" "Paste URL/Paste Include Tags"} {"" "Refresh Windows"}}
and the variable defining the submenu "Links" is defined
set htmlLinksSub {{"<B<O/A" "Link or Anchor" A} {"<B<O/I" Image IMG} {"" Object OBJECT} {"" Sound BGSOUND}}
What are the items in the sublists defining the menu items?
The first thing you should do when you want to modify a submenu is to copy the original definition to your HTML prefs file. You find the original definitions in the files htmlMenu.tcl and hctsmslMenu.tcl. Then you can redefine the variables in your HTML prefs file.
The next thing to do is to rebuild the submenu. That is done by adding a line
htmlRebuildOneMenu "menu name"
to your HTML prefs file.
As an explicit example, these two lines add an item "Close" to the submenu "Home Page Windows"
set htmlHomeSub {{"" Open...} {"" Close} {"<U<O/V" "Paste URL/Paste Include Tags"} {"" "Refresh Windows"}} htmlRebuildOneMenu "Home Page Windows"
Ok, it is not enough to just add a menu item. You want something to happen when you select it. This can be done automatically if you name the proc you want to be called like this: If you add a menu item "New Menu Item" then name the proc htmlNewMenuItem. This proc should have no arguments. In the above example we would have called the proc htmlClose. In fact, many of the procs called by the menu items in the HTML menus are named in this way, for example there are procs htmlInsertLineBreaks, htmlMakeList, etc. If you add a menu item ending by ... omit the ... in the proc name.